.class Lcom/htc/android/footprints/view/BrightnessPanel$1;
.super Ljava/lang/Object;
.source "BrightnessPanel.java"

# interfaces
.implements Landroid/view/View$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/htc/android/footprints/view/BrightnessPanel;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/htc/android/footprints/view/BrightnessPanel;


# direct methods
.method constructor <init>(Lcom/htc/android/footprints/view/BrightnessPanel;)V
    .locals 0
    .parameter

    .prologue
    .line 100
    iput-object p1, p0, Lcom/htc/android/footprints/view/BrightnessPanel$1;->this$0:Lcom/htc/android/footprints/view/BrightnessPanel;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onClick(Landroid/view/View;)V
    .locals 4
    .parameter "v"

    .prologue
    .line 101
    iget-object v1, p0, Lcom/htc/android/footprints/view/BrightnessPanel$1;->this$0:Lcom/htc/android/footprints/view/BrightnessPanel;

    iget-object v1, v1, Lcom/htc/android/footprints/view/BrightnessPanel;->mCameraDevice:Landroid/hardware/Camera;

    if-eqz v1, :cond_0

    iget-object v1, p0, Lcom/htc/android/footprints/view/BrightnessPanel$1;->this$0:Lcom/htc/android/footprints/view/BrightnessPanel;

    iget-object v1, v1, Lcom/htc/android/footprints/view/BrightnessPanel;->mHandler:Landroid/os/Handler;

    if-eqz v1, :cond_0

    .line 102
    iget-object v1, p0, Lcom/htc/android/footprints/view/BrightnessPanel$1;->this$0:Lcom/htc/android/footprints/view/BrightnessPanel;

    #calls: Lcom/htc/android/footprints/view/BrightnessPanel;->getDefault()V
    invoke-static {v1}, Lcom/htc/android/footprints/view/BrightnessPanel;->access$000(Lcom/htc/android/footprints/view/BrightnessPanel;)V

    .line 103
    :cond_0
    iget-object v1, p0, Lcom/htc/android/footprints/view/BrightnessPanel$1;->this$0:Lcom/htc/android/footprints/view/BrightnessPanel;

    iget v1, v1, Lcom/htc/android/footprints/view/BrightnessPanel;->mCurrentValue:I

    iget-object v2, p0, Lcom/htc/android/footprints/view/BrightnessPanel$1;->this$0:Lcom/htc/android/footprints/view/BrightnessPanel;

    iget v2, v2, Lcom/htc/android/footprints/view/BrightnessPanel;->mMin:I

    if-eq v1, v2, :cond_1

    iget-object v1, p0, Lcom/htc/android/footprints/view/BrightnessPanel$1;->this$0:Lcom/htc/android/footprints/view/BrightnessPanel;

    iget v1, v1, Lcom/htc/android/footprints/view/BrightnessPanel;->mCurrentValue:I

    iget-object v2, p0, Lcom/htc/android/footprints/view/BrightnessPanel$1;->this$0:Lcom/htc/android/footprints/view/BrightnessPanel;

    iget v2, v2, Lcom/htc/android/footprints/view/BrightnessPanel;->mMin:I

    if-ge v1, v2, :cond_2

    .line 104
    :cond_1
    iget-object v1, p0, Lcom/htc/android/footprints/view/BrightnessPanel$1;->this$0:Lcom/htc/android/footprints/view/BrightnessPanel;

    iget-object v2, p0, Lcom/htc/android/footprints/view/BrightnessPanel$1;->this$0:Lcom/htc/android/footprints/view/BrightnessPanel;

    iget v2, v2, Lcom/htc/android/footprints/view/BrightnessPanel;->mMin:I

    iput v2, v1, Lcom/htc/android/footprints/view/BrightnessPanel;->mCurrentValue:I

    .line 113
    :goto_0
    return-void

    .line 107
    :cond_2
    iget-object v1, p0, Lcom/htc/android/footprints/view/BrightnessPanel$1;->this$0:Lcom/htc/android/footprints/view/BrightnessPanel;

    iget v1, v1, Lcom/htc/android/footprints/view/BrightnessPanel;->mCurrentValue:I

    const/4 v2, 0x1

    sub-int v0, v1, v2

    .line 108
    .local v0, set_var:I
    const-string v1, "BrightnessPanel"

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "bright_desc:"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    iget-object v3, p0, Lcom/htc/android/footprints/view/BrightnessPanel$1;->this$0:Lcom/htc/android/footprints/view/BrightnessPanel;

    iget-object v3, v3, Lcom/htc/android/footprints/view/BrightnessPanel;->bright_desc:Landroid/view/View$OnClickListener;

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, " / mCurrentValue:"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    iget-object v3, p0, Lcom/htc/android/footprints/view/BrightnessPanel$1;->this$0:Lcom/htc/android/footprints/view/BrightnessPanel;

    iget v3, v3, Lcom/htc/android/footprints/view/BrightnessPanel;->mCurrentValue:I

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 109
    iget-object v1, p0, Lcom/htc/android/footprints/view/BrightnessPanel$1;->this$0:Lcom/htc/android/footprints/view/BrightnessPanel;

    #getter for: Lcom/htc/android/footprints/view/BrightnessPanel;->mContext:Landroid/content/Context;
    invoke-static {v1}, Lcom/htc/android/footprints/view/BrightnessPanel;->access$100(Lcom/htc/android/footprints/view/BrightnessPanel;)Landroid/content/Context;

    move-result-object v1

    check-cast v1, Lcom/htc/android/footprints/activity/FootprintCamera;

    invoke-virtual {v1}, Lcom/htc/android/footprints/activity/FootprintCamera;->resetBrightnessPanel()V

    .line 110
    iget-object v1, p0, Lcom/htc/android/footprints/view/BrightnessPanel$1;->this$0:Lcom/htc/android/footprints/view/BrightnessPanel;

    iget-object v1, v1, Lcom/htc/android/footprints/view/BrightnessPanel;->mCameraDevice:Landroid/hardware/Camera;

    invoke-static {v1, v0}, Lcom/htc/android/footprints/utils/FootprintUtils;->setCameraBrightness(Landroid/hardware/Camera;I)V

    .line 111
    iget-object v1, p0, Lcom/htc/android/footprints/view/BrightnessPanel$1;->this$0:Lcom/htc/android/footprints/view/BrightnessPanel;

    #getter for: Lcom/htc/android/footprints/view/BrightnessPanel;->mContext:Landroid/content/Context;
    invoke-static {v1}, Lcom/htc/android/footprints/view/BrightnessPanel;->access$100(Lcom/htc/android/footprints/view/BrightnessPanel;)Landroid/content/Context;

    move-result-object v1

    invoke-static {v1, v0}, Lcom/htc/android/footprints/utils/FootprintUtils;->putBrightPreferences(Landroid/content/Context;I)V

    .line 112
    iget-object v1, p0, Lcom/htc/android/footprints/view/BrightnessPanel$1;->this$0:Lcom/htc/android/footprints/view/BrightnessPanel;

    iget-object v2, p0, Lcom/htc/android/footprints/view/BrightnessPanel$1;->this$0:Lcom/htc/android/footprints/view/BrightnessPanel;

    #getter for: Lcom/htc/android/footprints/view/BrightnessPanel;->mLevelBar:Landroid/view/ViewGroup;
    invoke-static {v2}, Lcom/htc/android/footprints/view/BrightnessPanel;->access$200(Lcom/htc/android/footprints/view/BrightnessPanel;)Landroid/view/ViewGroup;

    move-result-object v2

    #calls: Lcom/htc/android/footprints/view/BrightnessPanel;->refreshLevelBar(Landroid/view/ViewGroup;I)V
    invoke-static {v1, v2, v0}, Lcom/htc/android/footprints/view/BrightnessPanel;->access$300(Lcom/htc/android/footprints/view/BrightnessPanel;Landroid/view/ViewGroup;I)V

    goto :goto_0
.end method
